class AgentService {
    constructor ($http, $q, $rootScope,$cookies,Constant, Event, AjaxError,ResponseService,Logger,Http) {
        Object.assign(this, {$http, $q, $rootScope,$cookies,Constant, Event, AjaxError,ResponseService,Logger,Http});
    }

    /**
     *
     * @param param
     */
    createSubordinate(param){
        let self =this;
        return self.Http.post("api/agent_reg", param);
    }

    /**
     * 生成推广链接
     * @param profitRatio
     */
    createPopulaUrl(param){
        let self =this;
        return self.Http.post("api/create_popula_url", param);
    }

    /**
     * 获取团队总览
     * @param param
     */
    getTeamStatic(param){
        let self =this;
        return self.Http.post("api/get_team_static", param);
    }

    getMemberList(param){
        let self =this;
        return self.Http.post("api/get_member_list", param);
    }

    getTeamChargeList(param){
        let self =this;
        return self.Http.post("api/get_team_charge_list", param);
    }

    getConfigList(param){
        let self =this;
        return self.Http.post("api/get_agent_config_list", param);
    }

    get_team_withdraw_list(param){
        let self =this;
        return self.Http.post("api/get_team_withdraw_list", param);
    }

    get_curr_user_static(param){
        let self =this;
        return self.Http.post("api/get_curr_user_static", param);
    }

    get_lower_level_agent_static(param){
        let self =this;
        return self.Http.post("api/get_lower_level_agent_static", param);
    }

    get_team_total_static(param){
        let self =this;
        return self.Http.post("api/get_team_total_static", param);
    }
    get_profit_detail(param){
        let self =this;
        return self.Http.post("api/get_profit_detail", param);
    }
}

AgentService.$inject =
    ['$http', '$q', '$rootScope',"$cookies","Constant", 'Event', 'AjaxErrorHandler',"ResponseService","Logger","Http"];

export default AgentService;